package com.bawei.library_base.mvp.p;


import com.bawei.library_base.mvp.m.IModel;
import com.bawei.library_base.mvp.v.IView;

/**
 * @author : zhiyu
 * @date :
 * @content :
 */
public class BasePresenter<M extends IModel,V extends IView> implements IPresenter {

    protected M mModel;
    protected V mView;

    public BasePresenter(M mModel, V mView) {
        this.mModel = mModel;
        this.mView = mView;
    }

    @Override
    public void destroy() {
        if (mModel!=null){
            mModel.destroy();
            mModel=null;
        }
        if (mView!=null){
            mView=null;
        }
    }
}
